package eventStrategies.physicalModel;

import model.IPhysicalDataModel;
import eventManager.AppEvent;
import eventStrategies.IEventResponse;
import events.ECodeEventList;
import events.physicalModel.AddNameEvent;

public class AddNameStrategy extends IEventResponse {

	private IPhysicalDataModel physModel;
	
	public AddNameStrategy(IPhysicalDataModel physModel) {
		super(ECodeEventList.ADD_NAME);		
		this.physModel = physModel;
	}

	@Override
	public void execute(AppEvent event) {
		AddNameEvent fullEvent = (AddNameEvent) event;
		physModel.addName(fullEvent.name);
	}

}
